package com.tfb.boot.lianxi;

public class StringTest1 {
    String s1=new String("hello");
    char[] a1={'a','b','c'};
    Person person=new Person();

    public void exchange(String s1,char[] a1,Person person){
        s1="world";
        a1[0]='b';
        person.age=20;
    }

    public static void main(String[] args) {
        StringTest1 stringTest1 = new StringTest1();
        stringTest1.exchange(stringTest1.s1,stringTest1.a1,stringTest1.person);
        System.out.println(stringTest1.s1);
        System.out.println(stringTest1.a1);
        System.out.println(stringTest1.person.age);
    }
}

class Person{
    int age=18;
}
